package cn.shengchao.examstar.knowledge.acl.ports;

import cn.shengchao.examstar.knowledge.acl.dto.KnowledgePointMasteryDTO;
import cn.shengchao.examstar.knowledge.domain.vo.MasteryStatusEnum;

import java.util.List;

/**
 * 知识点掌握度接口
 * 定义与外部系统交互的方法
 */
public interface KnowledgePointMasteryPort {
    
    /**
     * 更新知识点掌握度
     *
     * @param userId 用户ID
     * @param knowledgePointId 知识点ID
     * @param degreeOfMastery 掌握程度
     * @param accuracyRate 正确率
     * @param studyPlanId 学习计划ID
     * @return 更新后的知识点掌握度
     */
    KnowledgePointMasteryDTO updateKnowledgePointMastery(Long userId, Long knowledgePointId, 
                                                        String degreeOfMastery, String accuracyRate, 
                                                        Long studyPlanId);
    
    /**
     * 批量更新知识点掌握度
     *
     * @param knowledgePointMasteryList 知识点掌握度列表
     * @return 更新后的知识点掌握度列表
     */
    List<KnowledgePointMasteryDTO> batchUpdateMastery(List<KnowledgePointMasteryDTO> knowledgePointMasteryList);
    
    /**
     * 获取学习计划相关的知识点掌握度
     *
     * @param studyPlanId 学习计划ID
     * @return 知识点掌握度列表
     */
    List<KnowledgePointMasteryDTO> getStudyPlanKnowledgePointMasteries(Long studyPlanId);
    
    /**
     * 更新知识点掌握度状态
     *
     * @param userId 用户ID
     * @param knowledgePointId 知识点ID
     * @param status 状态枚举
     * @return 更新后的知识点掌握度
     */
    KnowledgePointMasteryDTO updateKnowledgePointMasteryStatus(Long userId, Long knowledgePointId, 
                                                              MasteryStatusEnum status);
    
    /**
     * 批量更新知识点掌握度状态
     *
     * @param userId 用户ID
     * @param knowledgePointIds 知识点ID列表
     * @param status 状态枚举
     * @return 更新后的知识点掌握度列表
     */
    List<KnowledgePointMasteryDTO> batchUpdateKnowledgePointMasteryStatus(Long userId, List<Long> knowledgePointIds, 
                                                                          MasteryStatusEnum status);
} 